/* indent size: 2 */

module.exports = app => {
    const DataTypes = app.Sequelize;
  
    const Carousels = app.model.define('carousels', {
      id: {
        type: DataTypes.INTEGER,
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        comment: '轮播图id'
      },
      title: {
        type: DataTypes.STRING(255),
        allowNull: true,
        comment: '轮播图标题'
      },
      image: {
        type: DataTypes.STRING(255),
        allowNull: true,
        comment: '轮播图链接'
      },
      type: {
        type: DataTypes.INTEGER(11),
        allowNull: true,
        comment: '轮播图类型【0-带标题，1-不带标题】'
      },
      status: {
        type: DataTypes.INTEGER,
        defaultValue: 0,
        comment: '状态【0-停用，1-正常】'
      },
      createdAt: {
        type: DataTypes.DATE,
        allowNull: true,
        comment: '创建时间'
      },
      updatedAt: {
        type: DataTypes.DATE,
        allowNull: true,
        comment: '更新时间'
      },
      
    }, {
      tableName: 'carousels'
    });
  
    Carousels.associate = function() {
  
    }
  
    return Carousels;
  };
  